package com.unitd.base.module.api.service;

import com.unitd.base.module.api.mybatis.mapper.ApiHelpIssueMapper;
import com.unitd.base.module.api.entity.HelpIssueVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Service实现类
 *
 * @author lipengjun
 * @email 939961241@qq.com
 * @date 2018-11-07 11:04:20
 */
@Service
public class ApiHelpIssueService {
    @Autowired
    private ApiHelpIssueMapper helpIssueDao;

    public HelpIssueVo queryObject(Integer id) {
        return helpIssueDao.selectById(id);
    }

    public List<HelpIssueVo> queryList(Map<String, Object> map) {
        return helpIssueDao.selectByMap(map);
    }

    public int queryTotal(Map<String, Object> map) {
        return helpIssueDao.queryTotal(map);
    }

    public int save(HelpIssueVo helpIssue) {
        return helpIssueDao.insert(helpIssue);
    }

    public int update(HelpIssueVo helpIssue) {
        return helpIssueDao.updateById(helpIssue);
    }

    public int delete(Integer id) {
        return helpIssueDao.deleteById(id);
    }
}